﻿using System;

namespace Modbus
{
	/// <summary>
	/// 
	/// </summary>
	public abstract class ModbusWriter
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="value"></param>
		public abstract void Write(byte[] value);

		/// <summary>
		/// 
		/// </summary>
		/// <param name="value"></param>
		public abstract void Write(byte value);

		/// <summary>
		/// 
		/// </summary>
		/// <param name="value"></param>
		[CLSCompliant(false)]
		public virtual void Write(sbyte value)
		{
			this.Write((byte)(value));
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="value"></param>
		public abstract void Write(short value);

		/// <summary>
		/// 
		/// </summary>
		/// <param name="value"></param>
		[CLSCompliant(false)]
		public virtual void Write(ushort value)
		{
			this.Write((short)(value));
		}
	}
}
